<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../../baselist.jsp"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title></title>
</head>

<body>
<div>
	<form method="post" action="#">

		<div id="menubar">
			<div id="middleMenubar">
				<div id="innerMenubar">
					<div id="navMenubar">
						<ul>
							<li id="save"><a href="#" onclick="formSubmit('${pageContext.request.contextPath}/insertContractPc.action?contractId=${cid}','_self');">确定</a></li>
							<li id="back"><a href="formSubmit('${pageContext.request.contextPath}/selectPC.action">返回</a></li>
						</ul>
					</div>
				</div>
			</div>
		</div>

		<div class="textbox" id="centerTextbox">

			<div class="textbox-header">
				<div class="textbox-inner-header">
					<div class="textbox-title">
						新增货物信息
					</div>
				</div>
			</div>
			<div>
				<div>
					<table class="commonTable" cellspacing="1">
						<tr align="center">

							<td class="tableContent" aria-colspan="100"><input type="text" name="contractId" value="${cid}"/></td>

						</tr>
						<tr>
							<td class="columnTitle_mustbe">厂家名称：</td>
							<td class="tableContent">
								<select name="factoryId">
                                 <c:forEach items="${list}" var="li">
									 <option value="${li.factoryId}">${li.fullName}</option>
								 </c:forEach>
								</select>
							</td>
							<td class="columnTitle_mustbe">货号：</td>
							<td class="tableContent"><input type="text" name="productNo"/></td>
						</tr>
						<tr>
							<td class="columnTitle_mustbe">货物照片：</td>
							<td class="tableContent"><input type="text" name="productImage"/></td>

						</tr>
						<tr>
							<td class="columnTitle_mustbe">数量：</td>
							<td class="tableContent"><input type="text" name="cnumber"/></td>
							<td class="columnTitle_mustbe">包装单位：</td>
							<td class="tableContent">
								<input type="text" name="packingUnit"/>							</td>
						</tr>
						<tr>
							<td class="columnTitle_mustbe">装率：</td>
							<td class="tableContent"><input type="text" name="loadingRate"/></td>
							<td class="columnTitle_mustbe">箱数：</td>
							<td class="tableContent"><input type="text" name="boxNum"/></td>
						</tr>
						<tr>
							<td class="columnTitle_mustbe">单价：</td>
							<td class="tableContent"><input type="text" name="price"/></td>
							<td class="columnTitle_mustbe">排序号：</td>
							<td class="tableContent"><input type="text" name="orderNo"/></td>
						</tr>
						<tr>
							<
							<td class="columnTitle_mustbe">货物描述：</td>
							<td class="tableContent"><textarea name="productDesc" style="height:120px;"></textarea>
						</tr>
					</table>
				</div>
			</div>
		</div>
	</form>
</div>
<form name="icform" method="post">

<div id="menubar">
<div id="middleMenubar">
<div id="innerMenubar">

</div>
</div>
</div>
<div class="textbox" id="centerTextbox">
  <div class="textbox-header">
  <div class="textbox-inner-header">
  <div class="textbox-title">
    货物列表
  </div> 
  </div>
  </div>
  
<div>

<div class="eXtremeTable" >
<table id="ec_table" class="tableRegion" width="98%" >
	<thead>
	<tr>
		<td class="tableHeader"><input type="checkbox" name="contractId" onclick="checkAll('id',this)"></td>
		<td class="tableHeader">序号</td>
		<td class="tableHeader">厂家名称</td>
		<td class="tableHeader">货号</td>
		<td class="tableHeader">数量</td>
		<td class="tableHeader">包装单位</td>
		<td class="tableHeader">装率</td>
		<td class="tableHeader">箱数</td>
		<td class="tableHeader">单价</td>
		<td class="tableHeader">总金额</td>
		<td class="tableHeader">操作</td>
	</tr>
	</thead>
	<tbody class="tableBody" >
	
	<c:forEach items="${dataList}" var="o" varStatus="status">
	<tr class="odd" onmouseover="this.className='highlight'" onmouseout="this.className='odd'" >
		<td><input type="checkbox" name="contractProductId" value="${o.contractProductId}"/></td>
		<td>${status.index+1}</td>
		<td>${o.fullName}</td>
		<td><a href="${pageContext.request.contextPath}/factoryviews.action?factoryId=${o.contractProductId}">${o.productNo}</a></td>
		<td>${o.cnumber}</td>
		<td>${o.packingUnit}</td>
		<td>${o.loadingRate}</td>
		<td>${o.boxNum}</td>
		<td>${o.price}</td>
		<td>${o.cnumber*o.price}</td>
		<td>
			<a href="${ctx}/goupdateContractPc.action?contractProductId=${o.contractProductId}">[修改]</a>
			<a href="${ctx}/deleteContractPc.action?contractProductId=${o.contractProductId}">[删除]</a>
			<a href="${ctx}/selectextpc.action?contractProductId=${o.contractProductId}">[附件]</a>
		</td>
	</tr>
	</c:forEach>
	
	</tbody>
</table>
</div>
 
</div>

</div>
</form>
</body>
</html>

